import * as base64 from './tool/base64'
import * as hash from './tool/hash'
import * as time from './tool/time'
import * as type from './tool/type'
import * as web from './tool/web'
let tool: {base64?:typeof base64,hash?:typeof hash,time?:typeof time,type?:typeof type,web?:typeof web} = {}
if(!CC_EDITOR) tool = {base64,hash,time,type,web}
export {tool}

import * as cocos from './lib/cocos/cocos'
import http from './lib/http/http'
import * as pipeline from './lib/pipeline/pipeline'
import queue from './lib/queue/queue'
import socket from './lib/socket/socket'
import storage from './lib/storage/storage'
import task from './lib/task/task'
let lib: {cocos?:typeof cocos,http?:typeof http,pipeline?:typeof pipeline,queue?:typeof queue,socket?:typeof socket,storage?:typeof storage,task?:typeof task} = {}
if(!CC_EDITOR) lib = {cocos,http,pipeline,queue,socket,storage,task}
export {lib}

import gameManager from '../app-manager/game/com/gameManager'
import recorderManager from '../app-manager/recorder/com/recorderManager'
import eventManager from './manager/event/com/eventManager'
import soundManager from './manager/sound/com/soundManager'
import timerManager from './manager/timer/com/timerManager'
import uiManager from './manager/ui/com/uiManager'
export const viewKeys = {"pageGame":"pageGame","pageIndex":"pageIndex","pagePhysics":"pagePhysics","pageQuadtree":"pageQuadtree","paperGame":"paperGame","popSetting":"popSetting","topActionSheet":"topActionSheet","topLoading":"topLoading","topModal":"topModal","topToast":"topToast"}
export const musicKeys = {"music/bgm":"music/bgm"}
export const effecKeys = {"effect/annui":"effect/annui"}
export enum viewKeyEnum { 'pageGame','pageIndex','pagePhysics','pageQuadtree','paperGame','popSetting','topActionSheet','topLoading','topModal','topToast'}
export enum musicKeyEnum { 'music/bgm'}
export enum effecKeyEnum { 'effect/annui'}
export const Manager: {game?:typeof gameManager,recorder?:typeof recorderManager,event?:typeof eventManager,sound?:typeof soundManager,timer?:typeof timerManager,ui?:typeof uiManager} = {}
export const manager: {game?:gameManager,recorder?:recorderManager,event?:eventManager,sound?:soundManager<keyof typeof effecKeys,keyof typeof musicKeys>,timer?:timerManager,ui?:uiManager<keyof typeof viewKeys>} = {}

import jumpSystem from '../ecs-system/jumpSystem'
import moveSystem from '../ecs-system/moveSystem'
let System: {jump?:typeof jumpSystem,move?:typeof moveSystem} = {}
let system: {jump?:jumpSystem,move?:moveSystem} = {}
if(!CC_EDITOR) System = {jump:jumpSystem,move:moveSystem}
if(!CC_EDITOR) for (const key in System) { System.hasOwnProperty(key) && cc.js.setClassName(key + 'System', System[key]) }
if(!CC_EDITOR) system = {jump:new jumpSystem(),move:new moveSystem()}
export {System,system}

import data_game from '../app-model/data.game'
import data_user from '../app-model/data.user'
let data: {game?:data_game,user?:data_user} = {}
if(!CC_EDITOR) data = {game:new data_game(),user:new data_user()}
export {data}

import config_game from '../app-model/config.game'
import config_user from '../app-model/config.user'
let config: {game?:config_game,user?:config_user} = {}
if(!CC_EDITOR) config = {game:new config_game(),user:new config_user()}
export {config}

